home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Tools&Utilities / MTX Tool 1.3 / guide / guide.mtx < prev    next >
Text File  |  1996-04-29  |  10KB  |  282 lines

  1. %TITLE A Five Minute Guide to HTML and MTX
  2. %FILE index
  3. %IMAGES images/
  4. %AUTHOR Richard Rathe / rrathe@dean.med.ufl.edu
  5. %AUTHURL rrathe@dean.med.ufl.edu
  6. %VERSION MTX 1.3 / Guide 2.0
  7. %PATH http://www.med.ufl.edu/medinfo/mtx/guide/
  8. %MTX 1.3
  9.  
  10. #Introduction
  11.  
  12. ##What is HTML?
  13.  
  14. 'HTML stands for Hypertext Markup Language. HTML is the page layout standard used by the World Wide Web. The current version of HTML is 2.0 but extensions such as tables and floating graphics are also in use. Use a web browser such as Netscape Navigator, NCSA Mosaic, or Lynx to view HTML files.
  15.  
  16. ##What is MTX?
  17.  
  18. 'MTX is a simplified means for creating HTML documents. The MTX format is easy to learn and use. You can create MTX formatted files with any word processor or text editor. The MTX Tool converts these files into HTML pages in a matter of seconds.
  19.  
  20. ##How to use this guide?
  21.  
  22. 'This guide presents the basics of both HTML and MTX in a simple tutorial format. Each section (delimited by double horizontal lines) introduces a basic HTML concept followed by the equivalent MTX syntax. You may wish to copy and paste the examples into your own files and experiment with the concepts being presented. By the end of this exercise you should be able to create your own Web pages using either plain HTML or MTX.
  23.  
  24. -----
  25. -----
  26. #To Begin...
  27.  
  28. HTML files are nothing other than plain text files containing a series of page formatting tags. Tags consist of a less than sign (<), the tag name, and a greater than sign (>). "<TITLE>" is an example of a tag. Most tags have a complementary closing tag with an added slash character (/). "</TITLE>" is an example of a closing tag. Pairs of tags are used to enclose page elements such as the title of the page. HTML files have two major parts, the head and body, identified by the "<HEAD>" and <BODY> tags respecitively. The head contains the title and other information about the page. A properly formed HTML file also begins with the "<HTML>" tag and ends with "</HTML>". Here is an example:
  29.  
  30. =    <HTML>
  31. =    <HEAD>
  32. =    <TITLE>Basic HTML Page</TITLE>
  33. =    </HEAD>
  34. =    <BODY>
  35. =
  36. =      Empty for now...
  37. =
  38. =    </BODY>
  39. =    </HTML>
  40.  
  41. -----
  42.  
  43. MTX takes care of all of these details for you. One line of MTX is all you need to create the basic HTML file shown above:
  44.  
  45. =    %TITLE Basic HTML Page
  46. =
  47. =      Empty for now...
  48. =
  49.  
  50. -----
  51. -----
  52. #Adding Some Content
  53.  
  54. Now let's add some text to the body of the HTML document.
  55.  
  56. =    <HTML>
  57. =    <HEAD>
  58. =    <TITLE>Basic HTML Page</TITLE>
  59. =    </HEAD>
  60. =    <BODY>
  61. =    This is a short paragraph to demonstrate how HTML handles text.
  62. =    The most important thing to note is that extra space        ,
  63. =    tab, and return characters are ignored by HTML.
  64. =
  65. =    The blank line above will become a single space when displayed.
  66. =    </BODY>
  67. =    </HTML>
  68.  
  69. -----
  70.  
  71. Here's the next difference between HTML and MTX, in MTX blank lines are used to delimit paragraphs. Extra spaces and tabs are ignored just as with HTML.
  72.  
  73. =    %TITLE Basic HTML Page
  74. =
  75. =    This is a short paragraph to demonstrate how MTX handles text.
  76. =    Blank lines are used to delimit paragraphs.
  77. =
  78. =    The blank line above will force a paragraph break before this line.
  79.  
  80. -----
  81. -----
  82. #Paragraphs
  83.  
  84. HTML treats all text as one continuous paragraph until it comes to a paragraph "<P>" tag. By adding a "<P>" we divide the body of this page into two paragraphs.
  85.  
  86. =    <HTML>
  87. =    <HEAD>
  88. =    <TITLE>Basic HTML Page</TITLE>
  89. =    </HEAD>
  90. =    <BODY>
  91. =    This is a short paragraph to demonstrate how HTML handles text.
  92. =    The most important thing to note is that extra space        ,
  93. =    tab, and return characters are ignored by HTML.<P>
  94. =
  95. =    The blank line above will become a single space when displayed.
  96. =    </BODY>
  97. =    </HTML>
  98.  
  99. -----
  100.  
  101. Our paragraphs are already defined...
  102.  
  103. =    %TITLE Basic HTML Page
  104. =
  105. =    This is a short paragraph to demonstrate how MTX handles text.
  106. =    Blank lines are used to delimit paragraphs.
  107. =
  108. =    The blank line above will force a paragraph break before this line.
  109.  
  110. -----
  111. -----
  112. #Headings and Sections
  113.  
  114. 'Heading tags can be used to give structure to a page. Headings come in different "sizes" from 1 to 6. It is good practice to use the the top level heading "<H1>" to repeat the page title at the beginning of the body. Major sections should use "<H2>" headings, subsections "<H3>" headings, and so on.
  115.  
  116. =    <HTML>
  117. =    <HEAD>
  118. =    <TITLE>Basic HTML Page</TITLE>
  119. =    </HEAD>
  120. =    <BODY>
  121. =    <H1>Basic HTML Page</H1>
  122. =    This is a short paragraph to demonstrate how HTML handles text.
  123. =    The most important thing to note is that extra space        ,
  124. =    tab, and return characters are ignored by HTML.<P>
  125. =
  126. =    The blank line above will become a single space when displayed.
  127. =
  128. =    <H2>Second Section</H2>
  129. =
  130. =      Empty for now...
  131. =
  132. =    <H2>Third Section</H2>
  133. =
  134. =      Empty for now...
  135. =
  136. =    </BODY>
  137. =    </HTML>
  138.  
  139. -----
  140.  
  141. MTX automatically supplies the top level heading for the page from the "%TITLE" tag. Section headings are defined by adding a pound sign (#) to the heading text. As an added benefit, MTX will automatically create a table of contents for the page based on the section headings.
  142.  
  143. =    %TITLE Basic HTML Page
  144. =
  145. =    This is a short paragraph to demonstrate how MTX handles text.
  146. =    Blank lines are used to delimit paragraphs.
  147. =
  148. =    The blank line above will force a paragraph break before this line.
  149. =
  150. =    #Second Section
  151. =
  152. =      Empty for now...
  153. =
  154. =    #Third Section
  155. =
  156. =      Empty for now...
  157. =
  158.  
  159. -----
  160. -----
  161. #Adding Pictures
  162.  
  163. HTML documents can include pictures stored as separate files. These pictures are inserted in the text by the image "<IMG>" tag. This tag is unusual in that there is {*no*} closing "</IMG>" tag. The name of the picture file is included as part of the tag itself, in this case "picture.gif".
  164.  
  165. =    <HTML>
  166. =    <HEAD>
  167. =    <TITLE>Basic HTML Page</TITLE>
  168. =    </HEAD>
  169. =    <BODY>
  170. =    <H1>Basic HTML Page</H1>
  171. =    This is a short paragraph to demonstrate how HTML handles text.
  172. =    The most important thing to note is that extra space        ,
  173. =    tab, and return characters are ignored by HTML.<P>
  174. =
  175. =    The blank line above will become a single space when displayed.
  176. =
  177. =    <H2>Second Section</H2>
  178. =
  179. =    <IMG SRC="picture.gif">
  180. =
  181. =    <H2>Third Section</H2>
  182. =
  183. =      Empty for now...
  184. =
  185. =    </BODY>
  186. =    </HTML>
  187.  
  188. -----
  189.  
  190. The MTX approach to pictures is a bit simpler. The "≤=" and "=≥" tags are used to surround the name of the picture. Since the picture file is already known to be a GIF, the ".gif" extension is omitted.
  191.  
  192. =    %TITLE Basic HTML Page
  193. =
  194. =    This is a short paragraph to demonstrate how MTX handles text.
  195. =    Blank lines are used to delimit paragraphs.
  196. =
  197. =    The blank line above will force a paragraph break before this line.
  198. =
  199. =    #Second Section
  200. =
  201. =    ≤=picture=≥
  202. =
  203. =    #Third Section
  204. =
  205. =      Empty for now...
  206. =
  207.  
  208. -----
  209. -----
  210. #Hypertext Links
  211.  
  212. Now we are ready to add hypertext links to our file. The "<A>" anchor tags are used to enclose text (or images) to make "hot spots" in the document. Hot spots are indicated by color or other highlighting. Additional information about the link must appear just after the opening "<A>" tag. This usually takes the form of "HREF=URL" where URL is an address (in quotes) for the hypertext jump. The first example shows a hypertext link to a local file "example1.html" in the {*same*} directory as this one. The second example shows the use of a complete URL for both the hot text and link address.
  213.  
  214. =    <HTML>
  215. =    <HEAD>
  216. =    <TITLE>Basic HTML Page</TITLE>
  217. =    </HEAD>
  218. =    <BODY>
  219. =    <H1>Basic HTML Page</H1>
  220. =    This is a short paragraph to demonstrate how HTML handles text.
  221. =    The most important thing to note is that extra space        ,
  222. =    tab, and return characters are ignored by HTML.<P>
  223. =
  224. =    The blank line above will become a single space when displayed.
  225. =
  226. =    <H2>Second Section</H2>
  227. =
  228. =    <IMG SRC="picture.gif">
  229. =
  230. =    <H2>Third Section</H2>
  231. =
  232. =    This is a <A HREF="example1.html">link</A> to an example file.<P>
  233. =
  234. =    The MTX home page is located at: <A HREF="http://www.med.ufl.edu/medinfo/mtx/">http://www.med.ufl.edu/medinfo/mtx/</A>
  235. =
  236. =    </BODY>
  237. =    </HTML>
  238.  
  239. -----
  240.  
  241. MTX fixes several flaws with HTML "anchors." First, the syntax is simpler and easier to read--hypertext links are delimited by "≤#" and "#≥" tags. Second, the destination address comes after the link text. This is a more natural way to think about hypertext and adds to readability. Finally, redundant information is removed when using URLs or email addresses as links. Notice the brevity of the second hypertext example shown below. The "##" tells MTX to repeat the link text as the destination address.
  242.  
  243. =    %TITLE Basic HTML Page
  244. =
  245. =    This is a short paragraph to demonstrate how MTX handles text.
  246. =    Blank lines are used to delimit paragraphs.
  247. =
  248. =    The blank line above will force a paragraph break before this line.
  249. =
  250. =    #Second Section
  251. =
  252. =    ≤=picture=≥
  253. =
  254. =    #Third Section
  255. =
  256. =    This is a ≤#link#example1.html#≥ to an example file.
  257. =
  258. =    The MTX home page is located at: ≤#http://www.med.ufl.edu/medinfo/mtx/##≥
  259. =
  260.  
  261. -----
  262. -----
  263.  
  264. #Conclusion
  265.  
  266. 'During this exercise we have created two parallel example files--one using {#plain HTML#example1.html#} and the other using {#MTX#example2.mtx#} to generate {#HTML#example2.html#}. Notice that the MTX example contains an interactive table of contents. Creating a table of contents in plain HTML is left as an exercise for the reader.
  267.  
  268. ##Further Reading
  269.  
  270.     {#A Beginner's Guide to HTML#http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html#}
  271.  
  272.     {#MTX 1.3 User's Manual#http://www.med.ufl.edu/medinfo/mtx/docs/index.html#}
  273.  
  274.     {#Summary of MTX Format#format.txt#}
  275.  
  276.     {#MTX Tool Help Screen#help.txt#}
  277.  
  278.     {#Design Considerations for HTML Documents#design.html#}
  279.  
  280. -----
  281. MTX was developed by {#Richard Rathe, MD#http://www.med.ufl.edu/medinfo/people/rathe.html#}, Director of the {#Office of Medical Informatics#http://www.med.ufl.edu/medinfo/#} for the College of Medicine at the University of Florida. {*The MTX format, documentation, and tools are Copyright 1995 and 1996 by the University of Florida.*} MTX is available without charge for non-commercial use at {#http://www.med.ufl.edu/medinfo/mtx/##}. All copyright and authorship notices must remain in place.
  282.